/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50717
 Source Host           : localhost
 Source Database       : spring

 Target Server Type    : MySQL
 Target Server Version : 50717
 File Encoding         : utf-8

 Date: 04/26/2021 16:01:41 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `b_category`
-- ----------------------------
DROP TABLE IF EXISTS `b_category`;
CREATE TABLE `b_category` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `pid` varchar(32) DEFAULT NULL COMMENT '父级ID',
  `text` varchar(100) DEFAULT NULL COMMENT '文本内容',
  `sort` int(10) DEFAULT NULL COMMENT '排序',
  `desc` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_category`
-- ----------------------------
BEGIN;
INSERT INTO `b_category` VALUES ('1', '0', '生活', '1000', null), ('10', '0', '动物圈', '1009', null), ('11', '0', '舞蹈', '1010', null), ('12', '0', '数码', '1011', null), ('13', '0', '国创', '1012', null), ('14', '0', '鬼畜', '1013', null), ('15', '1', '日常', null, null), ('16', '1', '搞笑', null, null), ('17', '1', '运动', null, null), ('18', '1', '汽车', null, null), ('19', '1', '绘画', null, null), ('2', '0', '美食', '1001', null), ('20', '1', '手工', null, null), ('21', '1', '其他', null, null), ('22', '2', '美食制作', null, null), ('23', '2', '美食侦探', null, null), ('24', '2', '美食测评', null, null), ('25', '2', '田园美食', null, null), ('26', '2', '美食记录', null, null), ('27', '3', '单机游戏', null, null), ('28', '3', '网络游戏', null, null), ('29', '3', '手机游戏', null, null), ('3', '0', '游戏', '1002', null), ('30', '3', '电子竞技', null, null), ('31', '3', '桌游棋牌', null, null), ('32', '3', '音游', null, null), ('33', '3', 'GMV', null, null), ('34', '3', 'Mugen', null, null), ('35', '4', '音乐综合', null, null), ('36', '4', '音乐现场', null, null), ('37', '4', '演奏', null, null), ('38', '4', '翻唱', null, null), ('39', '4', 'MV', null, null), ('4', '0', '音乐', '1003', null), ('40', '4', 'VOCALOID-UTAU', null, null), ('41', '4', '电音', null, null), ('42', '4', '原创音乐', null, null), ('43', '5', '美妆', null, null), ('44', '5', '服饰', null, null), ('45', '5', 'T台', null, null), ('46', '5', '健身', null, null), ('47', '5', '风向标', null, null), ('48', '6', '科学科普', null, null), ('49', '6', '社科人文', null, null), ('5', '0', '时尚', '1004', null), ('50', '6', '财经', null, null), ('51', '6', '校园学习', null, null), ('52', '6', '职业职场', null, null), ('53', '6', '野生技术协会', null, null), ('54', '7', '综艺', null, null), ('55', '7', '明星', null, null), ('56', '8', '短片', null, null), ('57', '8', '影视杂谈', null, null), ('58', '8', '影视剪辑', null, null), ('59', '8', '预告-咨询', null, null), ('6', '0', '知识', '1005', null), ('60', '9', 'MAD-AMV', null, null), ('61', '9', 'MMD-3D', null, null), ('62', '9', '综合', null, null), ('63', '9', '短片-手术-配音', null, null), ('64', '9', '手办-模玩', null, null), ('65', '9', '特摄', null, null), ('66', '10', '喵星人', null, null), ('67', '10', '汪星人', null, null), ('68', '10', '野生动物', null, null), ('69', '10', '爬宠', null, null), ('7', '0', '娱乐', '1006', null), ('70', '10', '大熊猫', null, null), ('71', '10', '动物综合', null, null), ('72', '11', '宅舞', null, null), ('73', '11', '舞蹈综合', null, null), ('74', '11', '舞蹈教程', null, null), ('75', '11', '街舞', null, null), ('76', '11', '明星舞蹈', null, null), ('77', '11', '中国舞', null, null), ('78', '12', '手机平板', null, null), ('79', '12', '电脑装机', null, null), ('8', '0', '影视', '1007', null), ('80', '12', '摄影摄像', null, null), ('81', '12', '影音智能', null, null), ('82', '13', '国产动漫', null, null), ('83', '13', '国产原创相关', null, null), ('84', '13', '布袋戏', null, null), ('85', '13', '咨询', null, null), ('86', '13', '动态漫-广播剧', null, null), ('87', '14', '鬼畜教程', null, null), ('88', '14', '音MAD', null, null), ('89', '14', '人力VOCALOID', null, null), ('9', '0', '动漫', '1008', null), ('90', '14', '鬼畜剧场', null, null), ('91', '14', '教程演示', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `b_customized_label`
-- ----------------------------
DROP TABLE IF EXISTS `b_customized_label`;
CREATE TABLE `b_customized_label` (
  `id` varchar(32) NOT NULL,
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `label_text` varchar(100) DEFAULT NULL COMMENT '标签内容',
  `label_sort` int(10) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_customized_label`
-- ----------------------------
BEGIN;
INSERT INTO `b_customized_label` VALUES ('1', '118', '我的标签', '1'), ('2', '118', '我的喜好', '2');
COMMIT;

-- ----------------------------
--  Table structure for `b_dic`
-- ----------------------------
DROP TABLE IF EXISTS `b_dic`;
CREATE TABLE `b_dic` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `type` varchar(10) DEFAULT NULL COMMENT '类型',
  `k` int(10) DEFAULT NULL,
  `v` varchar(100) DEFAULT NULL,
  `sort` int(10) DEFAULT NULL COMMENT '排序',
  `desc` varchar(100) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `b_post`
-- ----------------------------
DROP TABLE IF EXISTS `b_post`;
CREATE TABLE `b_post` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
  `content` varchar(500) DEFAULT NULL COMMENT '内容',
  `share_count` int(10) DEFAULT NULL COMMENT '分享数',
  `comment_count` int(10) DEFAULT NULL COMMENT '评论数',
  `like_count` int(10) DEFAULT NULL COMMENT '点赞数',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人ID',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人ID',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  `view_count` int(10) DEFAULT NULL COMMENT '播放量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_post`
-- ----------------------------
BEGIN;
INSERT INTO `b_post` VALUES ('16099d654ead1e4789d14dfe89a7fe99', '118', '发表一个动态视频', '0', '1', '0', '118', '2021-04-17 22:31:36', '118', '2021-04-17 22:31:36', null), ('9a4a4091856515b21755d898ce3bfd15', '118', '发表一组动态图片', '0', '0', '0', '118', '2021-04-19 22:40:59', '118', '2021-04-19 22:40:59', null);
COMMIT;

-- ----------------------------
--  Table structure for `b_post_comment`
-- ----------------------------
DROP TABLE IF EXISTS `b_post_comment`;
CREATE TABLE `b_post_comment` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `pid` varchar(32) DEFAULT NULL COMMENT '父级id(评论对象，表示动态的id 或者 跟帖的id)',
  `content` varchar(500) DEFAULT NULL COMMENT '评论内容',
  `like_count` int(10) DEFAULT NULL COMMENT '点赞数',
  `dislike_count` int(10) DEFAULT NULL COMMENT '点踩数',
  `reply_to` varchar(32) DEFAULT NULL COMMENT '回复对象id（userid）',
  `create_by` varchar(32) DEFAULT NULL,
  `create_date` datetime DEFAULT NULL,
  `update_by` varchar(32) DEFAULT NULL,
  `update_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_post_comment`
-- ----------------------------
BEGIN;
INSERT INTO `b_post_comment` VALUES ('8b652d3ce67195eb76d253ce7af6f83f', '16099d654ead1e4789d14dfe89a7fe99', '恶狠狠的评论', '0', '0', '118', '118', '2021-04-17 22:57:14', '118', '2021-04-17 22:57:14');
COMMIT;

-- ----------------------------
--  Table structure for `b_post_file`
-- ----------------------------
DROP TABLE IF EXISTS `b_post_file`;
CREATE TABLE `b_post_file` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `post_id` varchar(32) DEFAULT NULL COMMENT 'post id',
  `post_file_url` varchar(1000) DEFAULT NULL COMMENT 'post 图片或者视频地址',
  `post_file_type` int(10) DEFAULT NULL COMMENT '文件类型0图，1视频',
  `post_file_order` int(10) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_post_file`
-- ----------------------------
BEGIN;
INSERT INTO `b_post_file` VALUES ('3eca602229e0819b1e17cffed6e70935', '9a4a4091856515b21755d898ce3bfd15', '2021/04/17/83058cda21b04f0690e94b4ed5e5b119.png', '0', '3'), ('3f9ddf368d04e3e2ad9193dec46b052d', '9a4a4091856515b21755d898ce3bfd15', '2021/04/17/83058cda21b04f0690e94b4ed5e5b118.png', '0', '2'), ('5607dce0dfa16a13c7a447ff7fa02040', '16099d654ead1e4789d14dfe89a7fe99', '2021/04/17/83058cda21b04f0690e94b4ed5e5b117.mp4', '1', '1'), ('5607dce0dfa16a13c7a447ff7fa02044', '9a4a4091856515b21755d898ce3bfd15', '2021/04/17/83058cda21b04f0690e94b4ed5e5b117.png', '0', '1');
COMMIT;

-- ----------------------------
--  Table structure for `b_post_like_record`
-- ----------------------------
DROP TABLE IF EXISTS `b_post_like_record`;
CREATE TABLE `b_post_like_record` (
  `id` varchar(32) NOT NULL,
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
  `post_id` varchar(32) DEFAULT NULL COMMENT 'post ID',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `b_recommend_label`
-- ----------------------------
DROP TABLE IF EXISTS `b_recommend_label`;
CREATE TABLE `b_recommend_label` (
  `id` varchar(32) NOT NULL,
  `category_id` varchar(32) DEFAULT NULL COMMENT 'b_category 表的二级分类id',
  `label_text` varchar(100) DEFAULT NULL,
  `label_sort` int(10) DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_recommend_label`
-- ----------------------------
BEGIN;
INSERT INTO `b_recommend_label` VALUES ('1', '15', '办公电脑', null), ('2', '15', '我的手机', null);
COMMIT;

-- ----------------------------
--  Table structure for `b_video`
-- ----------------------------
DROP TABLE IF EXISTS `b_video`;
CREATE TABLE `b_video` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `title` varchar(200) DEFAULT NULL COMMENT '标题',
  `type` int(1) DEFAULT NULL COMMENT '类型（0自制，1转载）',
  `label` varchar(32) DEFAULT NULL COMMENT '标签（来自 《标签表》id）',
  `description` varchar(500) DEFAULT NULL COMMENT '简介',
  `source` varchar(200) DEFAULT NULL COMMENT '转载来源（如果type是1，有值）',
  `reprint_permission` int(1) DEFAULT NULL COMMENT '转载权限（如果type是0，有值，0无权限，1有权限）',
  `file_url` varchar(200) DEFAULT NULL COMMENT '图片地址URL片段',
  `userid` varchar(32) DEFAULT NULL COMMENT '用户id',
  `like_count` int(10) DEFAULT NULL COMMENT '喜欢数',
  `dislike_count` int(10) DEFAULT NULL COMMENT '不喜欢数',
  `collect_count` int(10) DEFAULT NULL COMMENT '收藏数',
  `share_count` int(10) DEFAULT NULL COMMENT '分享数',
  `comment_count` int(10) DEFAULT NULL COMMENT '评论数',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人ID',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '修改人ID',
  `update_date` datetime DEFAULT NULL COMMENT '修改日期',
  `file_name` varchar(1000) DEFAULT NULL COMMENT '视频上传名称',
  `cover_pic_url` varchar(1000) DEFAULT NULL COMMENT '封面url',
  `cover_pic_name` varchar(1000) DEFAULT NULL COMMENT '封面文件名称',
  `view_count` int(10) DEFAULT NULL COMMENT '播放量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_video`
-- ----------------------------
BEGIN;
INSERT INTO `b_video` VALUES ('2ef3082a22be45a486a9c559259a1a75', '52', null, '22', '1112', '42', null, '2021/04/17/2ef3082a22be45a486a9c559259a1a79.jpg', '118', '0', '0', '0', '0', '2', '118', '2021-04-17 10:23:14', '118', '2021-04-17 10:23:14', '1111.jpg', '2021/04/17/83058cda21b04f0690e94b4ed5e5b118.jpeg', 'WechatIMG19955.jpeg', null), ('3abb5bd5fc2449d0b96b41dd16609d96', '5', null, '2', '111', '4', null, '7', '118', '0', '0', '0', '0', '0', '118', '2021-04-17 09:49:53', '118', '2021-04-17 09:49:53', null, null, null, null), ('8c15610e5a1546efa428c21c22b83daf', '5', null, '2', '111', '4', null, '7', '118', '0', '0', '0', '0', '0', '118', '2021-04-17 09:50:31', '118', '2021-04-17 09:50:31', null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `b_video_collection`
-- ----------------------------
DROP TABLE IF EXISTS `b_video_collection`;
CREATE TABLE `b_video_collection` (
  `id` varchar(32) DEFAULT NULL,
  `user_id` varchar(32) DEFAULT NULL,
  `video_id` varchar(32) DEFAULT NULL,
  `create_date` datetime DEFAULT NULL COMMENT '创建日期'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_video_collection`
-- ----------------------------
BEGIN;
INSERT INTO `b_video_collection` VALUES ('b9b52bce04a5f6bf2ee633cb47715858', '118', '2ef3082a22be45a486a9c559259a1a75', '2021-04-21 17:19:17');
COMMIT;

-- ----------------------------
--  Table structure for `b_video_comment`
-- ----------------------------
DROP TABLE IF EXISTS `b_video_comment`;
CREATE TABLE `b_video_comment` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `pid` varchar(32) DEFAULT NULL COMMENT '父级id(当评论对象，为id 表示 动态的id 或者 跟帖的id)',
  `content` varchar(500) DEFAULT NULL COMMENT '评论内容',
  `like_count` int(10) DEFAULT NULL COMMENT '点赞数',
  `dislike_count` int(10) DEFAULT NULL COMMENT '点踩数',
  `reply_to` varchar(32) DEFAULT NULL COMMENT '回复的人id',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人ID',
  `create_date` datetime DEFAULT NULL COMMENT '创建日期',
  `update_by` varchar(32) DEFAULT NULL COMMENT '更新人ID',
  `update_date` datetime DEFAULT NULL COMMENT '更新日期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `b_video_comment`
-- ----------------------------
BEGIN;
INSERT INTO `b_video_comment` VALUES ('80824449e0580c85d7b0bed636c58a2c', '2ef3082a22be45a486a9c559259a1a75', '视频一下视频', '0', '0', '118', '118', '2021-04-17 23:11:31', '118', '2021-04-17 23:11:31'), ('d4813d19280aba32048b8b50ea08fc91', '2ef3082a22be45a486a9c559259a1a75', '视频一下视频', '0', '0', '118', '118', '2021-04-17 23:13:23', '118', '2021-04-17 23:13:23');
COMMIT;

-- ----------------------------
--  Table structure for `b_video_like_record`
-- ----------------------------
DROP TABLE IF EXISTS `b_video_like_record`;
CREATE TABLE `b_video_like_record` (
  `id` varchar(32) NOT NULL COMMENT '唯一ID',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户ID',
  `video_id` varchar(32) DEFAULT NULL COMMENT '视频ID',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Table structure for `hibernate_sequence`
-- ----------------------------
DROP TABLE IF EXISTS `hibernate_sequence`;
CREATE TABLE `hibernate_sequence` (
  `next_val` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `hibernate_sequence`
-- ----------------------------
BEGIN;
INSERT INTO `hibernate_sequence` VALUES ('1');
COMMIT;

-- ----------------------------
--  Table structure for `lcn_demo`
-- ----------------------------
DROP TABLE IF EXISTS `lcn_demo`;
CREATE TABLE `lcn_demo` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL,
  `module` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `lcn_demo`
-- ----------------------------
BEGIN;
INSERT INTO `lcn_demo` VALUES ('2', 'dfg', '23456');
COMMIT;

-- ----------------------------
--  Table structure for `lcn_demo2`
-- ----------------------------
DROP TABLE IF EXISTS `lcn_demo2`;
CREATE TABLE `lcn_demo2` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) DEFAULT NULL,
  `module` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
--  Records of `lcn_demo2`
-- ----------------------------
BEGIN;
INSERT INTO `lcn_demo2` VALUES ('1', 'cruise', 'lcnDemo2');
COMMIT;

-- ----------------------------
--  Table structure for `oauth_client_details`
-- ----------------------------
DROP TABLE IF EXISTS `oauth_client_details`;
CREATE TABLE `oauth_client_details` (
  `client_id` varchar(256) NOT NULL,
  `resource_ids` varchar(256) DEFAULT NULL,
  `client_secret` varchar(256) DEFAULT NULL,
  `scope` varchar(256) DEFAULT NULL,
  `authorized_grant_types` varchar(256) DEFAULT NULL,
  `web_server_redirect_uri` varchar(256) DEFAULT NULL,
  `authorities` varchar(256) DEFAULT NULL,
  `access_token_validity` int(11) DEFAULT NULL,
  `refresh_token_validity` int(11) DEFAULT NULL,
  `additional_information` varchar(4096) DEFAULT NULL,
  `autoapprove` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`client_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
--  Records of `oauth_client_details`
-- ----------------------------
BEGIN;
INSERT INTO `oauth_client_details` VALUES ('buttsdance-admin', null, '$2a$10$24iDED77IH3QOo/1aXH/ku8BO77ZnLP33i4nLFABkiWALttmD4fjW', 'all', 'password,refresh_token', null, null, '3600', '7200', null, null), ('h5_client_id', null, '$2a$10$24iDED77IH3QOo/1aXH/ku8BO77ZnLP33i4nLFABkiWALttmD4fjW', 'all', 'password,refresh_token', null, null, '3600', '7200', null, null), ('youlai-mall-weapp', null, '$2a$10$24iDED77IH3QOo/1aXH/ku8BO77ZnLP33i4nLFABkiWALttmD4fjW', 'all', 'password,refresh_token', null, null, '3600', '7200', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `code` varchar(255) DEFAULT NULL COMMENT '菜单编码',
  `p_code` varchar(255) DEFAULT NULL COMMENT '菜单父编码',
  `p_id` varchar(32) DEFAULT NULL COMMENT '父菜单ID',
  `name` varchar(255) DEFAULT NULL COMMENT '名称',
  `url` varchar(255) DEFAULT NULL COMMENT '请求地址',
  `is_menu` int(11) DEFAULT NULL COMMENT '是否是菜单(1.菜单。2.按钮)',
  `level` int(11) DEFAULT NULL COMMENT '菜单层级',
  `sort` int(11) DEFAULT NULL COMMENT '菜单排序',
  `status` int(11) DEFAULT NULL COMMENT '菜单状态（是否激活）',
  `del_flag` int(255) DEFAULT NULL COMMENT '是否删除',
  `icon` varchar(255) DEFAULT NULL COMMENT '菜单图标',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建者',
  `update_by` varchar(32) DEFAULT NULL COMMENT '最后更新者',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `FK_CODE` (`code`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
--  Records of `sys_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES ('1', '002', '001', '0', '菜单1', '/1/2/3', '1', '1', '1', '1', '0', '2', '48', null, '2020-12-19 23:00:44', '2020-12-19 00:01:46');
COMMIT;

-- ----------------------------
--  Table structure for `sys_resource`
-- ----------------------------
DROP TABLE IF EXISTS `sys_resource`;
CREATE TABLE `sys_resource` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `name` varchar(50) DEFAULT NULL COMMENT '权限名称',
  `url` varchar(100) DEFAULT NULL COMMENT '资源路径',
  `gmt_create` datetime DEFAULT NULL,
  `gmt_modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  KEY `id` (`id`,`name`) USING BTREE,
  KEY `id_2` (`id`,`name`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='权限表';

-- ----------------------------
--  Records of `sys_resource`
-- ----------------------------
BEGIN;
INSERT INTO `sys_resource` VALUES ('1', '业务系统资源1', '/biztest1/**', null, null), ('2', '业务系统资源2', '/biztest2/**', null, null), ('3', 'h5端', '/h5/**', null, null);
COMMIT;

-- ----------------------------
--  Table structure for `sys_role`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `name` varchar(255) NOT NULL COMMENT '角色名',
  `value` varchar(255) DEFAULT NULL COMMENT '角色值',
  `tips` varchar(255) DEFAULT NULL COMMENT '角色描述',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建者',
  `update_by` varchar(32) DEFAULT NULL COMMENT '最后更新人',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后更新时间',
  `status` int(11) DEFAULT NULL COMMENT '状态（是否可用）',
  `del_flag` varchar(255) DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `unique_role_name` (`name`) USING BTREE,
  UNIQUE KEY `unique_role_value` (`value`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
--  Records of `sys_role`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES ('17', '用户', 'user', null, 'admin', 'admin', '2019-06-13 19:02:59', '2017-07-21 09:41:28', '1', '0'), ('6', '超级管理员', 'super', null, 'admin', 'admin', '2021-01-17 16:22:56', '2019-06-05 10:55:23', '1', '0'), ('8', '管理员', 'admin', null, 'admin', 'admin', '2021-01-17 16:22:59', '2017-06-26 12:46:09', '1', '0');
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_menu`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `role_id` varchar(32) NOT NULL COMMENT '角色id',
  `menu_id` varchar(32) NOT NULL COMMENT '菜单id',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`role_id`,`menu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
--  Records of `sys_role_menu`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES ('6', '1', '2020-12-22 23:01:25');
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_resource`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_resource`;
CREATE TABLE `sys_role_resource` (
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `resource_id` varchar(32) DEFAULT NULL COMMENT '资源id',
  KEY `role_id` (`role_id`) USING BTREE,
  KEY `permission_id` (`resource_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色权限表';

-- ----------------------------
--  Records of `sys_role_resource`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_resource` VALUES ('8', '1'), ('8', '1'), ('6', '2'), ('17', '3'), ('17', '1');
COMMIT;

-- ----------------------------
--  Table structure for `sys_role_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_user`;
CREATE TABLE `sys_role_user` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `user_id` varchar(32) DEFAULT NULL COMMENT '用户id',
  `role_id` varchar(32) DEFAULT NULL COMMENT '角色id',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
--  Records of `sys_role_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_user` VALUES ('1', '48', '8', '2020-12-09 22:59:10'), ('2', '46', '6', '2021-01-21 03:05:09'), ('33', '118', '17', '2021-04-12 00:16:39');
COMMIT;

-- ----------------------------
--  Table structure for `sys_schedule`
-- ----------------------------
DROP TABLE IF EXISTS `sys_schedule`;
CREATE TABLE `sys_schedule` (
  `id` varchar(32) NOT NULL COMMENT '主键id',
  `sche_bean_name` varchar(255) NOT NULL COMMENT '定时任务指定类注册名',
  `sche_method` varchar(255) DEFAULT NULL COMMENT '定时任务类执行方法，默认使用run（）方法',
  `sche_cron` varchar(255) NOT NULL COMMENT '定时任务执行规则cron表达式',
  `sche_desc` varchar(255) DEFAULT NULL COMMENT '定时任务描述',
  `sche_status` int(255) NOT NULL COMMENT '定时任务状态',
  `del_flag` int(255) NOT NULL COMMENT '是否删除',
  `create_by` varchar(32) DEFAULT NULL COMMENT '创建人',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) DEFAULT NULL COMMENT '最后更新人',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '最后更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

-- ----------------------------
--  Table structure for `sys_user`
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  `username` varchar(45) NOT NULL COMMENT '用户名',
  `password` varchar(96) NOT NULL COMMENT '密码',
  `truename` varchar(45) DEFAULT NULL COMMENT '真实名称',
  `birthday` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '生日',
  `sex` int(11) DEFAULT NULL COMMENT '性别（1男, 1女）',
  `email` varchar(45) DEFAULT NULL COMMENT '邮箱',
  `phone` varchar(100) DEFAULT NULL COMMENT '手机号',
  `status` int(11) DEFAULT NULL COMMENT '账号状态（是否激活）',
  `del_flag` int(10) DEFAULT NULL COMMENT '是否删除',
  `create_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后更新时间',
  `avatar` longtext COMMENT '头像',
  `nickname` varchar(32) DEFAULT NULL COMMENT '用户昵称',
  `signature` varchar(200) DEFAULT NULL COMMENT '签名',
  `fans_count` int(10) DEFAULT NULL COMMENT '粉丝数',
  `concern_count` int(10) DEFAULT NULL COMMENT '关注数',
  `like_count` int(10) DEFAULT NULL COMMENT '获赞数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `sys_user`
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES ('118', '', '', null, '2021-04-17 18:42:06', null, null, '13900000000', '0', '0', '2021-04-17 18:42:06', '2021-04-17 18:42:06', '2021/04/17/83058cda21b04f0690e94b4ed5e5b118.jpeg', 'banana', '还没有设置个性签名哦', '0', '0', '0'), ('46', 'super', '$2a$10$JRL2kWBpOsnG2i0g.3gdB.kmwrklfIJuIrQaq7F1AkK.pEQHcNOQO', '超级管理员', '2021-04-06 21:18:35', '1', null, '', '0', '0', '2019-06-13 18:44:36', '2019-06-13 18:44:36', null, null, null, null, null, null), ('48', 'admin2', '$2a$10$24iDED77IH3QOo/1aXH/ku8BO77ZnLP33i4nLFABkiWALttmD4fjW', '管理员', '2021-04-06 23:27:56', '1', null, '13848759374', '0', '0', '2019-06-13 18:44:36', '2019-06-13 18:44:36', null, null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `t_tx_exception`
-- ----------------------------
DROP TABLE IF EXISTS `t_tx_exception`;
CREATE TABLE `t_tx_exception` (
  `id` bigint(20) NOT NULL,
  `create_time` datetime DEFAULT NULL,
  `ex_state` smallint(6) NOT NULL,
  `group_id` varchar(60) DEFAULT NULL,
  `mod_id` varchar(100) DEFAULT NULL,
  `registrar` smallint(6) NOT NULL,
  `remark` varchar(255) DEFAULT NULL,
  `transaction_state` int(11) DEFAULT NULL,
  `unit_id` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

SET FOREIGN_KEY_CHECKS = 1;
